<h1> Guessing Game</h1>

#{extends 'main.html' /}

<input id="guess" class="ggg"/>
<button onclick="make_guess()" class="ggg">make guess</button>

<input id="result" amit="levy">
<br/>
<img src="/public/images/cake.jpg" style="display:none"/>
<img src="/public/images/pivot2.gif"/>


<script>
	var number = Math.ceil(Math.random()*20);
	console.log(number)
	
	
	
	function make_guess()
	{
		console.log(guess.value)
		if ( guess.value > number )
		{
			result.value = "too BIG"
		}
		if ( guess.value < number )
		{
			result.value = "too SMALL"
		}
		if ( guess.value == number )
		{
			result.value = "you win"
			$("img").show()
	    }
	    
	    $("#result").effect("highlight",{}, 1000)
	    
	}
	

</script>